package com.atguigu.springboot.health;

import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

/**
 * @author admin
 * @create 2020-07-13 22:51
 */
@Component
public class MyAppHealthIndicator implements HealthIndicator{

    @Override
    public Health health() {
        //Health.up().build(); //表示服务健康
        return Health.down().withDetail("msg","服务异常!").build();
    }
}
